import styles from './styles.less';
import DataTable from './DataTable';
import {useState} from 'react';
import {Modal} from "antd";


const App = (props) => {

  const {verifys, setVerifys} = props.data;
  const [tablePayload, setTablePayload] = useState({pageNum: 1, pageSize: 10, param: {}});

  /* 取消操作 */
  function onCancel() {
    setVerifys(undefined);
  }

  return (
    <Modal
      title={verifys ? verifys.title : ''}
      open={verifys ? verifys.visible : false}
      forceRender={true}
      onCancel={onCancel}
      footer={null}
      width={1400}
      bodyStyle={{paddingTop: 12, borderTop: '1px solid #f4f4f4'}}
    >
      <div className={styles.myContainer}>
        <DataTable data={{verifys, tablePayload, setTablePayload}}/>
      </div>
    </Modal>
  );
};

export default App;
